<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index(){
        $list = db("user")->select();
        $e = [];
        foreach ($list as $v){
            $e[] = db("user_extra")->where("user_id",$v["id"])->update([
                "star" => $v["star"],
                "pid" => $v["pid"],
                "update_time" => time(),
            ]);
        }
        $this->success('请求成功',$e);
    }
}
